<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ModelHasRole extends Model
{
    public function roleInfo(){
        return $this->hasOne('App\Models\Role','id','role_id')->select('id','name')->withDefault([
           'id' => -1,
           'name' => ''
        ]);
    }
}
